/*
 * BaseElement.h
 *
 *  Created on: 2010-6-5
 *      Author: Guobc
 */

#ifndef BASEELEMENT_H_
#define BASEELEMENT_H_

#include "CommonElement.h"

namespace HA {
class BaseElement: public CommonElement {

public:

	BaseElement() :
		HA::CommonElement() {

	}

	/**
	 * Get the set of names handles by this element.
	 * @return The names to be matched that create elements of this type.
	 */
	inline string* getIds() const {
		return mIds;
	}

	/**
	 * Allow creating an instance of this node.
	 * @return A new instance of this node.
	 */
	inline ASTNode* newInstance() const {
		return new BaseElement();
	}

	/**
	 * Sets the HREF attribute to this element.
	 * @param url The HREF value
	 */
	inline void setBaseHref(const string& url) {
		setAttribute("HREF", url);
	}

	/**
	 * Gets the HREF attribute of this element.
	 * @return A url of HREF value.
	 */
	inline string getBaseHref() {
		return getAttribute("HREF");
	}

private:
	static string mIds[];
};

}

#endif /* BASEELEMENT_H_ */
